<template>
  <div>
    <div style="width: 100%;  border: 1px solid rgb(231, 230, 229);">
      <el-table ref="singleTable" :data="listData" highlight-current-row :row-style="rowStyle" style="width: 100%">
        <el-table-column align="center" type="index" label="序号" width="50"></el-table-column>
        <el-table-column align="center" prop="goodsId" label="编号" width="120"></el-table-column>
        <el-table-column align="center" prop="tradeNo" label="支付流水号"></el-table-column>
        <el-table-column align="center" prop="settlementInterval" label="结算周期"></el-table-column>
        <el-table-column align="center" prop="goodsTotalFee" label="订单金额(元)"></el-table-column>
        <el-table-column align="center" prop="serviceCharge" label="手续费(元)"></el-table-column>
        <el-table-column align="center" prop="payMoney" label="实结金额(元)"></el-table-column>
        <el-table-column align="center" prop="payCahnnel" label="支付方式"></el-table-column>
        <el-table-column align="center" prop="billStatus" label="状态"></el-table-column>
        <el-table-column align="center" prop="updateTime" label="创建时间"></el-table-column>
        <el-table-column align="center" label="操作">
          <template slot-scope="scope">
             <el-button size="mini" @click="handleEdit(scope.$index, scope.row)">查看</el-button>
          </template>
        </el-table-column>
      </el-table>
    </div>
  </div>
</template>
<script>
  export default {
    name: "ListPage",
    props: ["listData"],
    data() {
      return {};
    },
    created() { },
    methods: {
      rowStyle(row) {
        if (row.row.billStatus == 0) {
          row.row.billStatus = "待结算";
        } else if (row.row.billStatus == 1) {
          row.row.billStatus = "已结算";
        } else if (row.row.billStatus == 2) {
          row.row.billStatus = "退款中";
        } else if (row.row.billStatus == 3) {
          row.row.billStatus = "退款成功";
        }
        if (row.row.isReceipt == 0) {
          row.row.isReceipt = "未收货";
        } else if (row.row.isReceipt == 1) {
          row.row.isReceipt = "已收货";
        }
        if (row.row.serviceCharge == null||row.row.serviceCharge == 0) {
          row.row.serviceCharge = "免手续费";
        }
      },
      handleEdit(index, row) {
        this.$router.push("oms/details/" + row.id);
      },
    },
  };
</script>
<style scoped>
</style>